diff --git a/doc/Makefile.am b/doc/Makefile.am
index 87832275e1..a1288e3ad5 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -1,112 +1,125 @@
#
# doc: Pacemaker code
#
# Copyright (C) 2008 Andrew Beekhof
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
MAINTAINERCLEANFILES = Makefile.in
helpdir = $(datadir)/$(PACKAGE)
ascii = crm_cli.txt crm_fencing.txt
help_DATA = crm_cli.txt
docbook = Pacemaker_Explained
man_MANS = cibadmin.8 crm_resource.8
doc_DATA = README.hb2openais $(ascii) $(generated_docs)
publican_docs =
generated_docs =
+SVG := $(wildcard */en-US/images/pcmk-*.svg)
+PNGS = $(SVG:%.svg=%-small.png) $(SVG:%.svg=%.png) $(SVG:%.svg=%-large.png)
+
+graphics: $(PNGS)
+
+%.png: %.svg
+ inkscape --file=$< --export-dpi=90 --export-area-drawing --export-png=$@
+
+%-small.png: %.svg
+ inkscape --file=$< --export-dpi=45 --export-area-drawing --export-png=$@
+
+%-large.png: %.svg
+ inkscape --file=$< --export-dpi=180 --export-area-drawing --export-png=$@
XML_FILES := $(wildcard *.xml)
PNG_FILES := $(wildcard images/*.png)
if BUILD_ASCIIDOC
generated_docs += $(ascii:%.txt=%.html)
endif
if BUILD_DOCBOOK
publican_docs += $(docbook)
generated_docs += index.html
endif
EXTRA_DIST = $(man_MANS) $(docbook:%=%.xml)
index.html: $(docbook_txt)
echo "Building documentation index"
echo "
The following Pacemaker documentation was generated on `date` from version: $(BUILD_VERSION)
" > index.html
echo "" >> index.html
for doc in $(generated_docs); do \
echo "
" >> index.html
echo "" >> index.html
%.html: %.txt
$(ASCIIDOC) --unsafe --backend=xhtml11 $<
%.txt: %/en-US/*.xml
cd $* && $(PUBLICAN) build --publish --langs=all --formats=pdf,html,html-single,txt
touch $@
if BUILD_DOCBOOK
docbook_txt = $(docbook:%=%.txt)
all-local: $(docbook_txt) */publican.cfg
#install-data-local: all-local
install-data-local: all-local
for book in $(docbook); do \
filelist=`find $$book/publish/* -print`; \
for f in $$filelist; do \
p=`echo $$f | sed s:publish/:: | sed s:Pacemaker/::`; \
if [ -d $$f ]; then \
$(INSTALL) -d 775 $(DESTDIR)$(docdir)/$$p; \
else \
$(INSTALL) -m 644 $$f $(DESTDIR)$(docdir)/$$p; \
fi \
done; \
done
endif
push: all-local $(generated_docs)
echo Uploading current documentation set to clusterlabs.org
rsync -rtz --progress $(generated_docs) $(ascii) root@oss.clusterlabs.org:/srv/www/extras/doc/
if BUILD_DOCBOOK
for book in $(docbook); do \
echo Uploading $$book...; \
echo "Generated on `date` from version: $(BUILD_VERSION)" > $$book/publish/build-$(PACKAGE_SERIES).txt; \
rsync -rtz --progress $$book/publish/* root@oss.clusterlabs.org:/srv/www/extras/doc/; \
done
endif
clean-local:
-rm -rf $(generated_docs) $(docbook_txt)
for book in $(docbook); do rm -rf $$book/tmp $$book/publish; done
diff --git a/doc/Pacemaker_Explained/en-US/Ch-Intro.xml b/doc/Pacemaker_Explained/en-US/Ch-Intro.xml
index 139165612a..e6972209a4 100644
--- a/doc/Pacemaker_Explained/en-US/Ch-Intro.xml
+++ b/doc/Pacemaker_Explained/en-US/Ch-Intro.xml
@@ -1,175 +1,175 @@
Read-Me-FirstThe Scope of this Document
The purpose of this document is to definitively explain the concepts used to configure Pacemaker.
To achieve this best, it will focus exclusively on the XML syntax used to configure the CIB.
For those that are allergic to XML, Pacemaker comes with a cluster shell and a Python based GUI exists, however these tools will not be covered at all in this document
It is hoped however, that having understood the concepts explained here, that the functionality of these tools will also be more readily understood.
, precisely because they hide the XML.
Additionally, this document is NOT a step-by-step how-to guide for configuring a specific clustering scenario.
Although such guides exist, the purpose of this document is to provide an understanding of the building blocks that can be used to construct any type of Pacemaker cluster.
What Is Pacemaker?
Pacemaker is a cluster resource manager.
It achieves maximum availability for your cluster services (aka. resources) by detecting and recovering from node and resource-level failures by making use of the messaging and membership capabilities provided by your preferred cluster infrastructure (either OpenAIS or Heartbeat).
Pacemaker's key features include:Detection and recovery of node and service-level failuresStorage agnostic, no requirement for shared storageResource agnostic, anything that can be scripted can be clusteredSupports STONITH for ensuring data integritySupports large and small clustersSupports both quorate and resource driven clustersSupports practically any redundancy configurationAutomatically replicated configuration that can be updated from any nodeAbility to specify cluster-wide service ordering, colocation and anti-colocationSupport for advanced services type
Clones: for services which need to be active on multiple nodesMulti-state: for services with multiple modes (eg. master/slave, primary/secondary)Unified, scriptable, cluster shellTypes of Pacemaker ClustersPacemaker makes no assumptions about your environment, this allows it to support practically any redundancy configuration including Active/Active, Active/Passive, N+1, N+M, N-to-1 and N-to-N.Pacemaker ArchitectureAt the highest level, the cluster is made up of three pieces:
Core cluster infrastructure providing messaging and membership functionality (illustrated in red)
Non-cluster aware components (illustrated in blue).
In a Pacemaker cluster, these pieces include not only the scripts that knows how to start, stop and monitor resources, but also a local daemon that masks the differences between the different standards these scripts implement.
A brain (illustrated in green) that processes and reacts to events from the cluster (nodes leaving or joining) and resources (eg. monitor failures) as well as configuration changes from the administrator.
In response to all of these events, Pacemaker will compute the ideal state of the cluster and plot a path to achieve it.
This may include moving resources, stopping nodes and even forcing them offline with remote power switches.
When combined with OpenAIS, Pacemaker also supports popular open source cluster filesystems
Even though Pacemaker also supports Heartbeat, the filesystems need to use the stack for messaging and membership and OpenAIS seems to be what they're standardizing on.
Technically it would be possible for them to support Heartbeat as well, however there seems little interest in this.
Due to recent standardization within the cluster filesystem community, they make use of a common distributed lock manager which makes use of OpenAIS for its messaging capabilities and Pacemaker for its membership (which nodes are up/down) and fencing services.
Internal ComponentsPacemaker itself is composed of four key components (illustrated below in the same color scheme as the previous diagram):CIB (aka. Cluster Information Base)CRMd (aka. Cluster Resource Management daemon)PEngine (aka. PE or Policy Engine)STONITHd
The CIB uses XML to represent both the cluster's configuration and current state of all resources in the cluster.
The contents of the CIB are automatically kept in sync across the entire cluster and are used by the PEngine to compute the ideal state of the cluster and how it should be achieved.
This list of instructions is then fed to the DC (Designated Co-ordinator).
Pacemaker centralizes all cluster decision making by electing one of the CRMd instances to act as a master.
Should the elected CRMd process, or the node it is on, fail...
a new one is quickly established.
The DC carries out the PEngine's instructions in the required order by passing them to either the LRMd (Local Resource Management daemon) or CRMd peers on other nodes via the cluster messaging infrastructure (which in turn passes them on to their LRMd process).The peer nodes all report the results of their operations back to the DC and based on the expected and actual results, will either execute any actions that needed to wait for the previous one to complete, or abort processing and ask the PEngine to recalculate the ideal cluster state based on the unexpected results.
In some cases, it may be necessary to power off nodes in order to protect shared data or complete resource recovery.
For this Pacemaker comes with STONITHd.
STONITH is an acronym for Shoot-The-Other-Node-In-The-Head and is usually implemented with a remote power switch.
In Pacemaker, STONITH devices are modeled as resources (and configured in the CIB) to enable them to be easily monitored for failure, however STONITHd takes care of understanding the STONITH topology such that its clients simply request a node be fenced and it does the rest.
diff --git a/doc/Pacemaker_Explained/en-US/images/pcmk-active-active.svg b/doc/Pacemaker_Explained/en-US/images/pcmk-active-active.svg
new file mode 100644
index 0000000000..c377cce410
--- /dev/null
+++ b/doc/Pacemaker_Explained/en-US/images/pcmk-active-active.svg
@@ -0,0 +1,1398 @@
+
+
+
+
diff --git a/doc/Pacemaker_Explained/en-US/images/pcmk-active-passive.svg b/doc/Pacemaker_Explained/en-US/images/pcmk-active-passive.svg
new file mode 100644
index 0000000000..2c33fd0db2
--- /dev/null
+++ b/doc/Pacemaker_Explained/en-US/images/pcmk-active-passive.svg
@@ -0,0 +1,1027 @@
+
+
+
+
diff --git a/doc/Pacemaker_Explained/en-US/images/pcmk-internals.svg b/doc/Pacemaker_Explained/en-US/images/pcmk-internals.svg
new file mode 100644
index 0000000000..c2f50044f8
--- /dev/null
+++ b/doc/Pacemaker_Explained/en-US/images/pcmk-internals.svg
@@ -0,0 +1,1158 @@
+
+
+
+
diff --git a/doc/Pacemaker_Explained/en-US/images/pcmk-overview.svg b/doc/Pacemaker_Explained/en-US/images/pcmk-overview.svg
new file mode 100644
index 0000000000..9fb022db44
--- /dev/null
+++ b/doc/Pacemaker_Explained/en-US/images/pcmk-overview.svg
@@ -0,0 +1,855 @@
+
+
+
+
diff --git a/doc/Pacemaker_Explained/en-US/images/pcmk-shared-failover.svg b/doc/Pacemaker_Explained/en-US/images/pcmk-shared-failover.svg
new file mode 100644
index 0000000000..b28d09cea3
--- /dev/null
+++ b/doc/Pacemaker_Explained/en-US/images/pcmk-shared-failover.svg
@@ -0,0 +1,1306 @@
+
+
+
+
diff --git a/doc/Pacemaker_Explained/en-US/images/pcmk-stack.svg b/doc/Pacemaker_Explained/en-US/images/pcmk-stack.svg
new file mode 100644
index 0000000000..ac5455799e
--- /dev/null
+++ b/doc/Pacemaker_Explained/en-US/images/pcmk-stack.svg
@@ -0,0 +1,909 @@
+
+
+
+